<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <div th:replace="common/commonVant::commonStaticVant"></div>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <script src="https://cdn.staticfile.org/echarts/4.3.0/echarts.min.js"></script>
</head>
<body>
<div id="app">
    <div id="main" style="width:100%;height:400px;"></div>
</div>
<script>
    let mvvm = new Vue({
        el: '#app',
        data: {
            echarts: null
        },
        methods: {
            initCharts() {
                let myChart = echarts.init(document.getElementById('main'));

                // 指定图表的配置项和数据
                let option = {
                    title: {
                        text: '一周详细列表'
                    },
                    tooltip: {},
                    legend: {
                        data: ['周期列表详细信息']
                    },
                    xAxis: {
                        data: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"]
                    },
                    yAxis: {},
                    series: [{
                        name: '销量',
                        type: 'bar',
                        data: [5, 20, 36, 10, 10, 20, 100]
                    }]
                };

                // 使用刚指定的配置项和数据显示图表。
                myChart.setOption(option);
            }
        },
        mounted() {
            this.initCharts();
            this.echarts = echarts;
        }
    })
</script>
<script type="text/javascript">
</script>
</body>
</html>